import axios from 'axios'

// 设置默认头
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
axios.defaults.withCredentials = false // 是否携带cookie 否

// http request 拦截器
axios.interceptors.request.use(
  config => {
    return config
  },
  err => {
    return err
  }
)

// http response 拦截器
axios.interceptors.response.use(
  response => {
    return response
  },
  err => {
    return err
  }
)
export default axios
